Integrand size = 28, antiderivative size = 257 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx=\frac {1}{2} b^2 d f n^2 \log (x)-\frac {1}{2} b d f n \log \left (1+\frac {1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \log \left (1+\frac {1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{4} b^2 d f n^2 \log \left (1+d f x^2\right )-\frac {b^2 n^2 \log \left (1+d f x^2\right )}{4 x^2}-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{2 x^2}+\frac {1}{4} b^2 d f n^2 \operatorname {PolyLog}\left (2,-\frac {1}{d f x^2}\right )+\frac {1}{2} b d f n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {1}{d f x^2}\right )+\frac {1}{4} b^2 d f n^2 \operatorname {PolyLog}\left (3,-\frac {1}{d f x^2}\right ) \]
1/2*b^2*d*f*n^2*ln(x)-1/2*b*d*f*n*ln(1+1/d/f/x^2)*(a+b*ln(c*x^n))-1/2*d*f* ln(1+1/d/f/x^2)*(a+b*ln(c*x^n))^2-1/4*b^2*d*f*n^2*ln(d*f*x^2+1)-1/4*b^2*n^ 2*ln(d*f*x^2+1)/x^2-1/2*b*n*(a+b*ln(c*x^n))*ln(d*f*x^2+1)/x^2-1/2*(a+b*ln( c*x^n))^2*ln(d*f*x^2+1)/x^2+1/4*b^2*d*f*n^2*polylog(2,-1/d/f/x^2)+1/2*b*d* f*n*(a+b*ln(c*x^n))*polylog(2,-1/d/f/x^2)+1/4*b^2*d*f*n^2*polylog(3,-1/d/f /x^2)
Result contains complex when optimal does not.
Time = 0.22 (sec) , antiderivative size = 488, normalized size of antiderivative = 1.90 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx=\frac {1}{4} \left (2 d f \log (x) \left (2 a^2+2 a b n+b^2 n^2+4 a b \left (-n \log (x)+\log \left (c x^n\right )\right )+2 b^2 n \left (-n \log (x)+\log \left (c x^n\right )\right )+2 b^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right )-\frac {\left (2 a^2+2 a b n+b^2 n^2+2 b (2 a+b n) \log \left (c x^n\right )+2 b^2 \log ^2\left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x^2}-d f \left (2 a^2+2 a b n+b^2 n^2+4 a b \left (-n \log (x)+\log \left (c x^n\right )\right )+2 b^2 n \left (-n \log (x)+\log \left (c x^n\right )\right )+2 b^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right ) \log \left (1+d f x^2\right )-2 b d f n \left (-2 a-b n+2 b n \log (x)-2 b \log \left (c x^n\right )\right ) \left (\log (x) \left (\log (x)-\log \left (1-i \sqrt {d} \sqrt {f} x\right )-\log \left (1+i \sqrt {d} \sqrt {f} x\right )\right )-\operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-\operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )\right )+\frac {2}{3} b^2 d f n^2 \left (2 \log ^3(x)-3 \log ^2(x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )-3 \log ^2(x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )-6 \log (x) \operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-6 \log (x) \operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )+6 \operatorname {PolyLog}\left (3,-i \sqrt {d} \sqrt {f} x\right )+6 \operatorname {PolyLog}\left (3,i \sqrt {d} \sqrt {f} x\right )\right )\right ) \]
(2*d*f*Log[x]*(2*a^2 + 2*a*b*n + b^2*n^2 + 4*a*b*(-(n*Log[x]) + Log[c*x^n] ) + 2*b^2*n*(-(n*Log[x]) + Log[c*x^n]) + 2*b^2*(-(n*Log[x]) + Log[c*x^n])^ 2) - ((2*a^2 + 2*a*b*n + b^2*n^2 + 2*b*(2*a + b*n)*Log[c*x^n] + 2*b^2*Log[ c*x^n]^2)*Log[1 + d*f*x^2])/x^2 - d*f*(2*a^2 + 2*a*b*n + b^2*n^2 + 4*a*b*( -(n*Log[x]) + Log[c*x^n]) + 2*b^2*n*(-(n*Log[x]) + Log[c*x^n]) + 2*b^2*(-( n*Log[x]) + Log[c*x^n])^2)*Log[1 + d*f*x^2] - 2*b*d*f*n*(-2*a - b*n + 2*b* n*Log[x] - 2*b*Log[c*x^n])*(Log[x]*(Log[x] - Log[1 - I*Sqrt[d]*Sqrt[f]*x] - Log[1 + I*Sqrt[d]*Sqrt[f]*x]) - PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x] - Pol yLog[2, I*Sqrt[d]*Sqrt[f]*x]) + (2*b^2*d*f*n^2*(2*Log[x]^3 - 3*Log[x]^2*Lo g[1 - I*Sqrt[d]*Sqrt[f]*x] - 3*Log[x]^2*Log[1 + I*Sqrt[d]*Sqrt[f]*x] - 6*L og[x]*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x] - 6*Log[x]*PolyLog[2, I*Sqrt[d]*S qrt[f]*x] + 6*PolyLog[3, (-I)*Sqrt[d]*Sqrt[f]*x] + 6*PolyLog[3, I*Sqrt[d]* Sqrt[f]*x]))/3)/4
Time = 0.56 (sec) , antiderivative size = 254, normalized size of antiderivative = 0.99, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {2825, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx\) |
\(\Big \downarrow \) 2825 |
\(\displaystyle -2 f \int \left (-\frac {b^2 d n^2}{4 x \left (d f x^2+1\right )}-\frac {b d \left (a+b \log \left (c x^n\right )\right ) n}{2 x \left (d f x^2+1\right )}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 x \left (d f x^2+1\right )}\right )dx-\frac {b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {b^2 n^2 \log \left (d f x^2+1\right )}{4 x^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -2 f \left (-\frac {1}{4} b d n \operatorname {PolyLog}\left (2,-\frac {1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {1}{4} b d n \log \left (\frac {1}{d f x^2}+1\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {1}{4} d \log \left (\frac {1}{d f x^2}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{8} b^2 d n^2 \operatorname {PolyLog}\left (2,-\frac {1}{d f x^2}\right )-\frac {1}{8} b^2 d n^2 \operatorname {PolyLog}\left (3,-\frac {1}{d f x^2}\right )+\frac {1}{8} b^2 d n^2 \log \left (d f x^2+1\right )-\frac {1}{4} b^2 d n^2 \log (x)\right )-\frac {b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {b^2 n^2 \log \left (d f x^2+1\right )}{4 x^2}\) |
-1/4*(b^2*n^2*Log[1 + d*f*x^2])/x^2 - (b*n*(a + b*Log[c*x^n])*Log[1 + d*f* x^2])/(2*x^2) - ((a + b*Log[c*x^n])^2*Log[1 + d*f*x^2])/(2*x^2) - 2*f*(-1/ 4*(b^2*d*n^2*Log[x]) + (b*d*n*Log[1 + 1/(d*f*x^2)]*(a + b*Log[c*x^n]))/4 + (d*Log[1 + 1/(d*f*x^2)]*(a + b*Log[c*x^n])^2)/4 + (b^2*d*n^2*Log[1 + d*f* x^2])/8 - (b^2*d*n^2*PolyLog[2, -(1/(d*f*x^2))])/8 - (b*d*n*(a + b*Log[c*x ^n])*PolyLog[2, -(1/(d*f*x^2))])/4 - (b^2*d*n^2*PolyLog[3, -(1/(d*f*x^2))] )/8)
3.1.35.3.1 Defintions of rubi rules used
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. )]*(b_.))^(p_.)*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q* (a + b*Log[c*x^n])^p, x]}, Simp[Log[d*(e + f*x^m)^r] u, x] - Simp[f*m*r Int[x^(m - 1)/(e + f*x^m) u, x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m , n, q}, x] && IGtQ[p, 0] && RationalQ[m] && RationalQ[q]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 14.23 (sec) , antiderivative size = 612, normalized size of antiderivative = 2.38
method | result | size |
risch | \(-\frac {b^{2} n \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right )}{2 x^{2}}-b^{2} d f \ln \left (x \right )^{2} \ln \left (x^{n}\right ) n +b^{2} n d f \ln \left (x \right ) \ln \left (x^{n}\right )-\frac {b^{2} n d f \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right )}{2}-\frac {b^{2} n d f \,\operatorname {Li}_{2}\left (-d f \,x^{2}\right ) \ln \left (x^{n}\right )}{2}+\frac {b^{2} d f \,n^{2} \ln \left (x \right )}{2}-\frac {b^{2} d f \,n^{2} \ln \left (d f \,x^{2}+1\right )}{4}-\frac {b^{2} n^{2} d f \ln \left (x \right )^{2}}{2}+\frac {b^{2} n^{2} d f \ln \left (x \right )^{3}}{3}-\frac {b^{2} n^{2} d f \,\operatorname {Li}_{2}\left (-d f \,x^{2}\right )}{4}+\frac {b^{2} n^{2} d f \,\operatorname {Li}_{3}\left (-d f \,x^{2}\right )}{4}-\frac {b^{2} n^{2} \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}+b^{2} d f \ln \left (x \right ) \ln \left (x^{n}\right )^{2}-\frac {b^{2} d f \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right )^{2}}{2}-\frac {b^{2} \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right )^{2}}{2 x^{2}}+\left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 b \ln \left (c \right )+2 a \right ) b \left (\left (\ln \left (x^{n}\right )-n \ln \left (x \right )\right ) \left (-\frac {\ln \left (d f \,x^{2}+1\right )}{2 x^{2}}+d f \left (\ln \left (x \right )-\frac {\ln \left (d f \,x^{2}+1\right )}{2}\right )\right )+n \left (\frac {\left (-\frac {1}{4}-\frac {\ln \left (x \right )}{2}\right ) \ln \left (d f \,x^{2}+1\right )}{x^{2}}+\frac {d f \ln \left (x \right )}{2}-\frac {d f \ln \left (d f \,x^{2}+1\right )}{4}+\frac {d f \ln \left (x \right )^{2}}{2}-\frac {d f \ln \left (x \right ) \ln \left (d f \,x^{2}+1\right )}{2}-\frac {d f \,\operatorname {Li}_{2}\left (-d f \,x^{2}\right )}{4}\right )\right )+\frac {{\left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 b \ln \left (c \right )+2 a \right )}^{2} \left (-\frac {\ln \left (d f \,x^{2}+1\right )}{2 x^{2}}+d f \left (\ln \left (x \right )-\frac {\ln \left (d f \,x^{2}+1\right )}{2}\right )\right )}{4}\) | \(612\) |
-1/2*b^2*n/x^2*ln(d*f*x^2+1)*ln(x^n)-b^2*d*f*ln(x)^2*ln(x^n)*n+b^2*n*d*f*l n(x)*ln(x^n)-1/2*b^2*n*d*f*ln(d*f*x^2+1)*ln(x^n)-1/2*b^2*n*d*f*polylog(2,- d*f*x^2)*ln(x^n)+1/2*b^2*d*f*n^2*ln(x)-1/4*b^2*d*f*n^2*ln(d*f*x^2+1)-1/2*b ^2*n^2*d*f*ln(x)^2+1/3*b^2*n^2*d*f*ln(x)^3-1/4*b^2*n^2*d*f*polylog(2,-d*f* x^2)+1/4*b^2*n^2*d*f*polylog(3,-d*f*x^2)-1/4*b^2*n^2*ln(d*f*x^2+1)/x^2+b^2 *d*f*ln(x)*ln(x^n)^2-1/2*b^2*d*f*ln(d*f*x^2+1)*ln(x^n)^2-1/2*b^2/x^2*ln(d* f*x^2+1)*ln(x^n)^2+(-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*b*Pi*csg n(I*c)*csgn(I*c*x^n)^2+I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*b*Pi*csgn(I*c* x^n)^3+2*b*ln(c)+2*a)*b*((ln(x^n)-n*ln(x))*(-1/2/x^2*ln(d*f*x^2+1)+d*f*(ln (x)-1/2*ln(d*f*x^2+1)))+n*((-1/4-1/2*ln(x))/x^2*ln(d*f*x^2+1)+1/2*d*f*ln(x )-1/4*d*f*ln(d*f*x^2+1)+1/2*d*f*ln(x)^2-1/2*d*f*ln(x)*ln(d*f*x^2+1)-1/4*d* f*polylog(2,-d*f*x^2)))+1/4*(-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I *b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*b*Pi* csgn(I*c*x^n)^3+2*b*ln(c)+2*a)^2*(-1/2/x^2*ln(d*f*x^2+1)+d*f*(ln(x)-1/2*ln (d*f*x^2+1)))
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x^{2} + \frac {1}{d}\right )} d\right )}{x^{3}} \,d x } \]
integral((b^2*log(d*f*x^2 + 1)*log(c*x^n)^2 + 2*a*b*log(d*f*x^2 + 1)*log(c *x^n) + a^2*log(d*f*x^2 + 1))/x^3, x)
Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx=\text {Timed out} \]
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x^{2} + \frac {1}{d}\right )} d\right )}{x^{3}} \,d x } \]
-1/4*(2*b^2*log(x^n)^2 + (n^2 + 2*n*log(c) + 2*log(c)^2)*b^2 + 2*a*b*(n + 2*log(c)) + 2*a^2 + 2*(b^2*(n + 2*log(c)) + 2*a*b)*log(x^n))*log(d*f*x^2 + 1)/x^2 + integrate(1/2*(2*b^2*d*f*log(x^n)^2 + 2*a^2*d*f + 2*(d*f*n + 2*d *f*log(c))*a*b + (d*f*n^2 + 2*d*f*n*log(c) + 2*d*f*log(c)^2)*b^2 + 2*(2*a* b*d*f + (d*f*n + 2*d*f*log(c))*b^2)*log(x^n))/(d*f*x^3 + x), x)
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x^{2} + \frac {1}{d}\right )} d\right )}{x^{3}} \,d x } \]
Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx=\int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^3} \,d x \]